<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK"%>
<%@page import="com.sun.xml.internal.fastinfoset.Encoder"%>
<%@ taglib prefix="s" uri="/struts-tags"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>编辑器信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<script language="javascript" src="/js/common/jquery-1.4.2.min.js"></script>
<script language="javascript">
var supplierid = $("input#supplierid").val();
</script>
</head>

<body>
<div class="editorMain">
	<table cellspacing="1" style="width:640px;" class="editorTable">
		<tr style="height:31px;background-color:#f0f0f0;">
			<td>
				<div style="line-height:31px;">
					<div style="float:left;width:20%;height:31px;text-align:left;">编码</div>
					<div style="float:left;width:40%;height:31px;text-align:left;">名称</div>
					<div style="float:left;width:20%;height:31px;text-align:left;">单价</div>
					<div style="float:left;width:20%;height:31px;text-align:left;">起订量</div>
				</div>
			</td>
		</tr>
		<s:iterator value="srlist" id="srval">
		<tr style="height:31px;background-color:#ffffff;">
			<td>
				<div class="cargoRefer" style="height:31px;line-height:31px;">
					<span style="float:left;width:20%;text-align:left;">${srval.referid }</span>
					<span class="referName" style="float:left;width:40%;text-align:left;">${srval.name }</span>
					<span class="referPrice" style="float:left;width:20%;text-align:left;">${srval.price }</span>
					<span class="referLeast" style="float:left;width:20%;text-align:left;">${srval.least }</span>
				</div>
			</td>
		</tr>
		</s:iterator>
		<tr style="height:31px;"><td>当前第${pages.currentPage }页  共${pages.pageCount }页${pages.allNum }条数据
			<s:if test="pages.currentPage > 1"><a href="/refer/queryRefer.do?currentPage=1" onclick="return gotoEdit('选择商品', 1);">首页</a></s:if><s:else>首页</s:else>|
			<s:if test="pages.currentPage > 1"><a href="/refer/queryRefer.do?currentPage=${pages.currentPage - 1 }" onclick="return gotoEdit('选择商品', ${pages.currentPage - 1 });">上一页</a></s:if><s:else>上一页</s:else>|
			<s:if test="pages.currentPage < pages.pageCount"><a href="/refer/queryRefer.do?currentPage=${pages.currentPage + 1 }" onclick="return gotoEdit('选择商品', ${pages.currentPage + 1 });">下一页</a></s:if><s:else>下一页</s:else>|
			<s:if test="pages.currentPage < pages.pageCount"><a href="/refer/queryRefer.do?currentPage=${pages.pageCount }" onclick="return gotoEdit('选择商品', ${pages.pageCount });">末页</a></s:if><s:else>末页</s:else>
		</td></tr>
	</table>
</div>
<script language="javascript">
$(document).ready(function() {
	$("div.cargoRefer").mouseover(function() {
		$(this).attr("style","height:31px;line-height:31px;background-color:#f7f7f7;");	
	});
	$("div.cargoRefer").mouseout(function() {
		$(this).attr("style","height:31px;line-height:31px;background-color:#ffffff;");	
	});
	$("div.cargoRefer").click(function() {
		var index = $("div.cargoRefer").index(this);
		var referName = $("span.referName").eq(index).html();
		var referPrice = $("span.referPrice").eq(index).html();
		var referLeast = $("span.referLeast").eq(index).html();
		var iindex = "${index }";
		$("input.referName").eq(iindex).val(referName);
		$("input.referPrice").eq(iindex).val(referPrice);
		$("input.referLeast").eq(iindex).val(referLeast);
		$("#windownbg").remove();
		$("#windown-box").fadeOut("slow",function(){$j(this).remove();});		
	});
});
</script>
</body>
</html>